//
// Created by 11510 on 2024/6/7.
//

#ifndef DEMO1_POINT_H
#define DEMO1_POINT_H
using std::cout;
using std::endl;
/***
 * 创建存放Point对象的vector，尝试进行遍历
 */
class Point
{
public:
    Point(){
        _ix = 0;
        _iy = 0;
    }
    Point(int x, int y):_ix(x), _iy(y){}
    ~Point(){
        cout << "~point" << endl;
    }

    void init(int x,int y){
        this->_ix = x;
        this->_iy = y;
    }
    void toString(){
        cout << "x = " << _ix << "\t"
        << "y = " << _iy << endl;

    }

private:
    int _ix;
    int _iy;
};

#endif //DEMO1_POINT_H
